home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
kermit.columbia.edu
/
kermit.columbia.edu.tar
/
kermit.columbia.edu
/
newsgroups
/
misc.20031118-20041115
/
000397_dm_v_2000@yahoo.com_Tue Sep 21 17:46:25 2004.msg
< prev
next >
Wrap
Internet Message Format
|
2004-11-14
|
2KB
Path: newsmaster.cc.columbia.edu!newsfeed1.nycmny01.us.to.verio.net!newspeer1.stngva01.us.to.verio.net!verio!news.tele.dk!news.tele.dk!small.news.tele.dk!news.glorb.com!postnews1.google.com!not-for-mail
From: dm_v_2000@yahoo.com (Peter V.)
Newsgroups: comp.protocols.kermit.misc
Subject: Return codes and If statments
Date: 21 Sep 2004 13:52:08 -0700
Organization: http://groups.google.com
Lines: 41
Message-ID: <3f9c05b0.0409211252.5aa51cb1@posting.google.com>
NNTP-Posting-Host: 206.6.159.100
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: posting.google.com 1095799928 24642 127.0.0.1 (21 Sep 2004 20:52:08 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Tue, 21 Sep 2004 20:52:08 +0000 (UTC)
Xref: newsmaster.cc.columbia.edu comp.protocols.kermit.misc:15174
Hello,
I am modifying a C-Kermit script I have to not continue processing
if a call to another script does not return a value of 1 (We are doing
this for fail over testing).
Here is the C-Kermit code in question:
# run the db_status script in the CRON directory
run db_status
# See if the ret value is != 1
# If it != 1 tell user we are not on the primay server and then
exit).
if != \v(pexitstat) 1
{
echo Return code != 1 ... Not the primary server
echo return code = \v(pexitstat)
exit
}
# otherwise we are on the primary server so continue processing
...
...
...
When I run this on the Secondary server it works (since the result
returned from the db_status script is a 2 since it is not the primary
server).
However, when I test this on the primay server the code exits (meaning
it executes the body of the if statment above) despite the fact that
the return code from db_status is 1.
Any suggestions, as to what I'm doing wrong?
Many thanks in advance
Peter Vasseur